\documentclass[11pt, a4paper]{article}
\usepackage{booktabs}
\begin{document}

\begin{table}[htb]
    \centering
    \caption{Prices of breakfasts}
    \label{tab:ex1}
    \begin{tabular}{@{}lrcr@{}}
        \toprule
        Name & Qty & Price per kg & Price \\\relax
         & [kg] & [\$] & [\$] \\
        \midrule
        Apples & 10.2 & 5 & 51.0 \\
        Bananas & 7.3 & 11 & 80.3 \\
        Cherries & 5.7 & 30 & 171.0 \\
        Dates & 3.5 & 90 & 315.0 \\
        Eggs & 6.4 & 2 & 12.8 \\
        \bottomrule
    \end{tabular}
\end{table}

\end{document}
